import type { LinearGradient } from 'echarts/types/dist/echarts'

/**
 * Seller数据类型
 */
export type Seller = {
  // 商家名称
  name: string,
  // 销售额
  value: number,
}

/**
 * Trend数据类型
 */
export type Trend = {
  base: number;
  data: Datum[];
  title: Title;
  unit: Unit;
  [property: string]: any;
}

export type Datum = {
  data: number[];
  name: string;
  [property: string]: any;
}

export enum Title {
  goods = '商品销量趋势',
  merchant = '商家销量趋势',
  region = '地区销量趋势',
}

export enum Unit {
  w = '万',
}

export type TrendSeriesData = {
  name: string
  type: string
  data: number[]
  stack: string
  smooth: boolean
  symbol: string
  areaStyle: LinearGradient
}

export type Sort = {
  label: string
  value: string
}


/**
 * Rank数据类型
 */
export type Rank = {
  /**
   * 名称，名称
   */
  name: string;
  /**
   * 数值
   */
  value: number;
  [property: string]: any;
}


/**
 * Hot
 */
export type Hot = {
  /**
   * 分组，分组
   */
  children: Child[];
  /**
   * 名称，名称
   */
  name: string;
  [property: string]: any;
}

export type Child = {
  /**
   * 分组，分组
   */
  name: string;
  value: number;
  [property: string]: any;
}

export type Map = {
  name: string
  value: number
}